x86: improve reporting through XENMEM_machine_memory_map
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 3 Nov 2009 12:40:28 +0000 (12:40 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 3 Nov 2009 12:40:28 +0000 (12:40 +0000)
commitb8a456caedf2424255b585032fc9eac51d2a895d
treeae48840b556556d30ad579ece5ea4de70ebd9818
parentb95beb185810484d5afe91b994d2c2d1670af74c
x86: improve reporting through XENMEM_machine_memory_map

Since Dom0 derives machine address ranges usable for assigning PCI
device resources from the output of this sub-hypercall, Xen should
make
sure it properly reports all ranges not suitable for this (as either
reserved or unusable):
- RAM regions excluded via command line option
- memory regions used by Xen itself (LAPIC, IOAPICs)

While the latter should generally already be excluded by the BIOS
provided E820 table, this apparently isn't always the case at least
for IOAPICs, and with Linux having got changed to account for this it
seems to make sense to also do so in Xen.

Generally the HPET range should also be excluded here, but since it
isn't being reflected in Dom0's iomem_caps (and can't be, as it's a
sub-page range) I wasn't sure whether adding explicit code for doing
so would be reasonable.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/e820.c
xen/arch/x86/mm.c
xen/common/rangeset.c
xen/include/xen/rangeset.h